for i in range(1,10):
    for j in range(1,i+1):
        print(f"{j}*{i}={i*j}\t",end="")
    print()
print("***************************")
def print_jiujiu(n):
    if n<10:
        for m in range(1,n+1):
            print(f"{m}*{n}={m*n}",end="\t")
        print()
        print_jiujiu(n+1)
print_jiujiu(1)

def print_shuixianhua(num):
    print("打印1000以内的水仙花数：")
    for num in range(100,1000):
        bai=num//100
        shi=(num//10)%10
        ge=num%10
        sum=bai**3+shi**3+ge**3
        if sum==num:
            print(num)
print_shuixianhua(1000)



def is_perfect_num(num):
    if num <=1:
        return  False
    div_sum=0
    for i in range(1,num):
        if num %i==0:
            div_sum+=i
    return div_sum==num
def print_perfect_num(n):
    for num in range(1,n+1):
        if is_perfect_num(num):
            print(num)
print_perfect_num(100)







def F(n):
    if n==1 or n==2:
        return 1
    else:
        return F(n-1)+F(n-2)
def print_F(n):
    for i in range(1,n+1):
        print(f"第{i}项",F(i),end=" ")
        print()
print_F(50)




# 打印正三角
# i = 1
# # i为前半行每行的*的个数，range取1-11，从1开始可取的数字均为奇数
# for i in range(1, 8, 2):
#     # 打印*，并将*居中，center后的数值为菱形最长的部分长度
#     print(('*' * i).center(9))
# # 打印倒三角,倒三角第一行为9个*
# j = 9
# # j为倒三角每行的*的个数，
# for j in range(9, 0, -2):
#     print(('*' * j).center(9))




# 打印50以内的